package com.xinghen.validate;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author xinghen
 * @ClassName: MyValid
 * @Package: com.xinghen.validate
 * @Description my valid annotation
 * @create 2018/04/08 20:55
 */
@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MyConstraintValidator.class)
public @interface MyValid {

    String message();

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
